/*
 * @ProjectName: 编程学习
 * @Copyright:   2019 HangZhou Ashe Dev, Ltd. All Right Reserved.
 * @address:     https://yiyuery.github.io/NoteBooks/
 * @date:        2020/2/24 8:36 下午
 * @description: 本内容仅限于编程技术学习使用，转发请注明出处.
 */
package com.yi.yier.starter.controller;

import com.yi.yier.boot.autoconfigure.codegenerator.common.GenCodeParam;
import com.yi.yier.boot.autoconfigure.codegenerator.gen.ICodeGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *
 * </p>
 *
 * @author Yiyuery
 * @version V1.0.0
 * @date 2020/2/24 8:36 下午
 * @modificationHistory=========================逻辑或功能性重大变更记录
 * @modify By: {修改人}  2020/2/24
 * @modify reason: {方法名}:{原因}
 * ...
 */
@RestController
public class CodegeneratorController {

    @Autowired
    ICodeGenerator codeGenerator;

    @GetMapping("codegen")
    public String codeGen(String tableName,String sign,String modelName) {
        codeGenerator.genCode(GenCodeParam.builder()
                .tableName(tableName)
                .sign(sign)
                .modelName(modelName)
                .build());
        return "success";
    }
}
